<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: StSRecordFile Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_st_s_record_file.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_st_s_record_file-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">StSRecordFile Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>S-record parser.  
 <a href="class_st_s_record_file.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="apps_2elftosb_2common_2_st_s_record_file_8h_source.html">StSRecordFile.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Collaboration diagram for StSRecordFile:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="class_st_s_record_file__coll__graph.svg" width="480" height="398"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:struct_st_s_record_file_1_1_s_record"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#struct_st_s_record_file_1_1_s_record">SRecord</a></td></tr>
<tr class="separator:struct_st_s_record_file_1_1_s_record"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a4b439a23c78eaa62e57b8df3b610fedf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4b439a23c78eaa62e57b8df3b610fedf"></a>
typedef std::vector&lt; <a class="el" href="class_st_s_record_file.html#struct_st_s_record_file_1_1_s_record">SRecord</a> &gt;::<a class="el" href="class_st_s_record_file.html#a4b439a23c78eaa62e57b8df3b610fedf">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a4b439a23c78eaa62e57b8df3b610fedf">const_iterator</a></td></tr>
<tr class="memdesc:a4b439a23c78eaa62e57b8df3b610fedf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterator type. <br /></td></tr>
<tr class="separator:a4b439a23c78eaa62e57b8df3b610fedf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b439a23c78eaa62e57b8df3b610fedf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4b439a23c78eaa62e57b8df3b610fedf"></a>
typedef std::vector&lt; <a class="el" href="class_st_s_record_file.html#struct_st_s_record_file_1_1_s_record">SRecord</a> &gt;::<a class="el" href="class_st_s_record_file.html#a4b439a23c78eaa62e57b8df3b610fedf">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a4b439a23c78eaa62e57b8df3b610fedf">const_iterator</a></td></tr>
<tr class="memdesc:a4b439a23c78eaa62e57b8df3b610fedf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterator type. <br /></td></tr>
<tr class="separator:a4b439a23c78eaa62e57b8df3b610fedf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a881c861ae218e7a01c46cc8f1385a8f2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a881c861ae218e7a01c46cc8f1385a8f2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a881c861ae218e7a01c46cc8f1385a8f2">StSRecordFile</a> (std::istream &amp;inStream)</td></tr>
<tr class="memdesc:a881c861ae218e7a01c46cc8f1385a8f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a881c861ae218e7a01c46cc8f1385a8f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fcb868518a98795360f726cb29f9ae0"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a8fcb868518a98795360f726cb29f9ae0">~StSRecordFile</a> ()</td></tr>
<tr class="memdesc:a8fcb868518a98795360f726cb29f9ae0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a8fcb868518a98795360f726cb29f9ae0">More...</a><br /></td></tr>
<tr class="separator:a8fcb868518a98795360f726cb29f9ae0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a881c861ae218e7a01c46cc8f1385a8f2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a881c861ae218e7a01c46cc8f1385a8f2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a881c861ae218e7a01c46cc8f1385a8f2">StSRecordFile</a> (std::istream &amp;inStream)</td></tr>
<tr class="memdesc:a881c861ae218e7a01c46cc8f1385a8f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a881c861ae218e7a01c46cc8f1385a8f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e6301fe591546a21a22e4e3082e8bfe"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e6301fe591546a21a22e4e3082e8bfe"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a0e6301fe591546a21a22e4e3082e8bfe">~StSRecordFile</a> ()</td></tr>
<tr class="memdesc:a0e6301fe591546a21a22e4e3082e8bfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a0e6301fe591546a21a22e4e3082e8bfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">File name</div></td></tr>
<tr class="memitem:afc0a75ea0581ad3369025b4e1011909e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc0a75ea0581ad3369025b4e1011909e"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>setName</b> (const std::string &amp;inName)</td></tr>
<tr class="separator:afc0a75ea0581ad3369025b4e1011909e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96a5dbb50b27e205fe151eb9a34be0dc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a96a5dbb50b27e205fe151eb9a34be0dc"></a>
virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><b>getName</b> () const </td></tr>
<tr class="separator:a96a5dbb50b27e205fe151eb9a34be0dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc0a75ea0581ad3369025b4e1011909e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc0a75ea0581ad3369025b4e1011909e"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>setName</b> (const std::string &amp;inName)</td></tr>
<tr class="separator:afc0a75ea0581ad3369025b4e1011909e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96a5dbb50b27e205fe151eb9a34be0dc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a96a5dbb50b27e205fe151eb9a34be0dc"></a>
virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><b>getName</b> () const </td></tr>
<tr class="separator:a96a5dbb50b27e205fe151eb9a34be0dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Parsing</div></td></tr>
<tr class="memitem:ab3ed60149e0eeee552ba0a9ca9cbe3ce"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#ab3ed60149e0eeee552ba0a9ca9cbe3ce">isSRecordFile</a> ()</td></tr>
<tr class="memdesc:ab3ed60149e0eeee552ba0a9ca9cbe3ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if the file is an S-record file.  <a href="#ab3ed60149e0eeee552ba0a9ca9cbe3ce">More...</a><br /></td></tr>
<tr class="separator:ab3ed60149e0eeee552ba0a9ca9cbe3ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5855dddf97a886d1ef8f272ad511c41c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a5855dddf97a886d1ef8f272ad511c41c">parse</a> ()</td></tr>
<tr class="memdesc:a5855dddf97a886d1ef8f272ad511c41c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses the entire S-record input stream.  <a href="#a5855dddf97a886d1ef8f272ad511c41c">More...</a><br /></td></tr>
<tr class="separator:a5855dddf97a886d1ef8f272ad511c41c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cc3712e6e314d3675e1662d6bc2710e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3cc3712e6e314d3675e1662d6bc2710e"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a3cc3712e6e314d3675e1662d6bc2710e">isSRecordFile</a> ()</td></tr>
<tr class="memdesc:a3cc3712e6e314d3675e1662d6bc2710e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if the file is an S-record file. <br /></td></tr>
<tr class="separator:a3cc3712e6e314d3675e1662d6bc2710e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9a743de39eb1c957b4aa094f13d995f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad9a743de39eb1c957b4aa094f13d995f"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#ad9a743de39eb1c957b4aa094f13d995f">parse</a> ()</td></tr>
<tr class="memdesc:ad9a743de39eb1c957b4aa094f13d995f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses the entire S-record input stream. <br /></td></tr>
<tr class="separator:ad9a743de39eb1c957b4aa094f13d995f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Record access</div></td></tr>
<tr class="memitem:a50093e3e673fb3fc3cef96b027e9da13"><td class="memItemLeft" align="right" valign="top">unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a50093e3e673fb3fc3cef96b027e9da13">getRecordCount</a> () const </td></tr>
<tr class="separator:a50093e3e673fb3fc3cef96b027e9da13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afca35d431dd292a7a076dc61812132d7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_st_s_record_file.html#a4b439a23c78eaa62e57b8df3b610fedf">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#afca35d431dd292a7a076dc61812132d7">getBegin</a> () const </td></tr>
<tr class="separator:afca35d431dd292a7a076dc61812132d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee2ff1cf5cdcd1204d0ca65f84f37fc8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee2ff1cf5cdcd1204d0ca65f84f37fc8"></a>
<a class="el" href="class_st_s_record_file.html#a4b439a23c78eaa62e57b8df3b610fedf">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><b>getEnd</b> () const </td></tr>
<tr class="separator:aee2ff1cf5cdcd1204d0ca65f84f37fc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50093e3e673fb3fc3cef96b027e9da13"><td class="memItemLeft" align="right" valign="top">unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a50093e3e673fb3fc3cef96b027e9da13">getRecordCount</a> () const </td></tr>
<tr class="separator:a50093e3e673fb3fc3cef96b027e9da13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afca35d431dd292a7a076dc61812132d7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_st_s_record_file.html#a4b439a23c78eaa62e57b8df3b610fedf">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#afca35d431dd292a7a076dc61812132d7">getBegin</a> () const </td></tr>
<tr class="separator:afca35d431dd292a7a076dc61812132d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee2ff1cf5cdcd1204d0ca65f84f37fc8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee2ff1cf5cdcd1204d0ca65f84f37fc8"></a>
<a class="el" href="class_st_s_record_file.html#a4b439a23c78eaa62e57b8df3b610fedf">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><b>getEnd</b> () const </td></tr>
<tr class="separator:aee2ff1cf5cdcd1204d0ca65f84f37fc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Operators</div></td></tr>
<tr class="memitem:afa869ba43376380f284a5e225a8e3b1c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afa869ba43376380f284a5e225a8e3b1c"></a>
const <a class="el" href="class_st_s_record_file.html#struct_st_s_record_file_1_1_s_record">SRecord</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator[]</b> (unsigned inIndex)</td></tr>
<tr class="separator:afa869ba43376380f284a5e225a8e3b1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa869ba43376380f284a5e225a8e3b1c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afa869ba43376380f284a5e225a8e3b1c"></a>
const <a class="el" href="class_st_s_record_file.html#struct_st_s_record_file_1_1_s_record">SRecord</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator[]</b> (unsigned inIndex)</td></tr>
<tr class="separator:afa869ba43376380f284a5e225a8e3b1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Parsing utilities</div></td></tr>
<tr class="memitem:a3d2ffc96958eaf4502dcbcf1e506309c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a3d2ffc96958eaf4502dcbcf1e506309c">parseLine</a> (std::string &amp;inLine)</td></tr>
<tr class="memdesc:a3d2ffc96958eaf4502dcbcf1e506309c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses individual S-records.  <a href="#a3d2ffc96958eaf4502dcbcf1e506309c">More...</a><br /></td></tr>
<tr class="separator:a3d2ffc96958eaf4502dcbcf1e506309c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23f9ee27a85714edcde2a03ba2125d3a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a23f9ee27a85714edcde2a03ba2125d3a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isHexDigit</b> (char c)</td></tr>
<tr class="separator:a23f9ee27a85714edcde2a03ba2125d3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a301b60b18306239ef59106439b460595"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a301b60b18306239ef59106439b460595"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>hexDigitToInt</b> (char digit)</td></tr>
<tr class="separator:a301b60b18306239ef59106439b460595"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fbaf270f2939dc1d1f16b7fe1d4d5b8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a1fbaf270f2939dc1d1f16b7fe1d4d5b8">readHexByte</a> (std::string &amp;inString, int inIndex)</td></tr>
<tr class="separator:a1fbaf270f2939dc1d1f16b7fe1d4d5b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf3ed10ee19959dc2be0588c898ef168"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf3ed10ee19959dc2be0588c898ef168"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>parseLine</b> (std::string &amp;inLine)</td></tr>
<tr class="separator:aaf3ed10ee19959dc2be0588c898ef168"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23f9ee27a85714edcde2a03ba2125d3a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a23f9ee27a85714edcde2a03ba2125d3a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isHexDigit</b> (char c)</td></tr>
<tr class="separator:a23f9ee27a85714edcde2a03ba2125d3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a301b60b18306239ef59106439b460595"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a301b60b18306239ef59106439b460595"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>hexDigitToInt</b> (char digit)</td></tr>
<tr class="separator:a301b60b18306239ef59106439b460595"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fbaf270f2939dc1d1f16b7fe1d4d5b8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1fbaf270f2939dc1d1f16b7fe1d4d5b8"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>readHexByte</b> (std::string &amp;inString, int inIndex)</td></tr>
<tr class="separator:a1fbaf270f2939dc1d1f16b7fe1d4d5b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a6a08bff300a3f55e32622aed6c758b84"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6a08bff300a3f55e32622aed6c758b84"></a>
std::istream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a6a08bff300a3f55e32622aed6c758b84">m_stream</a></td></tr>
<tr class="memdesc:a6a08bff300a3f55e32622aed6c758b84"><td class="mdescLeft">&#160;</td><td class="mdescRight">The input stream for the S-record data. <br /></td></tr>
<tr class="separator:a6a08bff300a3f55e32622aed6c758b84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abeef8ce2fa239ecd9873b99e17b06fde"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abeef8ce2fa239ecd9873b99e17b06fde"></a>
std::vector&lt; <a class="el" href="class_st_s_record_file.html#struct_st_s_record_file_1_1_s_record">SRecord</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#abeef8ce2fa239ecd9873b99e17b06fde">m_records</a></td></tr>
<tr class="memdesc:abeef8ce2fa239ecd9873b99e17b06fde"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vector of S-records in the input data. <br /></td></tr>
<tr class="separator:abeef8ce2fa239ecd9873b99e17b06fde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77c7e073ea522f980890984d5e1943c8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a77c7e073ea522f980890984d5e1943c8"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_st_s_record_file.html#a77c7e073ea522f980890984d5e1943c8">m_name</a></td></tr>
<tr class="memdesc:a77c7e073ea522f980890984d5e1943c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">File name. (optional) <br /></td></tr>
<tr class="separator:a77c7e073ea522f980890984d5e1943c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>S-record parser. </p>
<p>This class takes an input stream and parses it as an S-record file. While the individual records that comprise the file are available for access, the class also provides a higher-level view of the contents. It processes the individual records and builds an image of what the memory touched by the file looks like. Then you can access the contiguous sections of memory. </p>
</div><hr/><h2 class="groupheader">Class Documentation</h2>
<a name="struct_st_s_record_file_1_1_s_record" id="struct_st_s_record_file_1_1_s_record"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct StSRecordFile::SRecord</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>Structure representing each individual line of the S-record input data. </p>
</div><table class="fieldtable">
<tr><th colspan="3">Class Members</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a7e6725881e4b34df17631b3082aed033"></a>uint32_t</td>
<td class="fieldname">
m_address</td>
<td class="fielddoc">
The address specified as part of the S-record. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a76a2842dc02c9defc44b06c32bdca7c5"></a>uint8_t</td>
<td class="fieldname">
m_checksum</td>
<td class="fielddoc">
The checksum byte present in the S-record. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="adae3d8a9b406538185a879dd7e27de2e"></a>unsigned</td>
<td class="fieldname">
m_count</td>
<td class="fielddoc">
Number of character pairs (bytes) from address through checksum. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a1eeaa18e0f207a0b4cc1641266119c4c"></a>uint8_t *</td>
<td class="fieldname">
m_data</td>
<td class="fielddoc">
Pointer to data, or NULL if no data for this record type. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="adb1d1c5ddaa7d5c8377818623a38d452"></a>unsigned</td>
<td class="fieldname">
m_dataCount</td>
<td class="fielddoc">
Number of bytes of data. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a4119c8ec5d96f752dfcb58bba79b9c21"></a>unsigned</td>
<td class="fieldname">
m_type</td>
<td class="fielddoc">
Record number type, such as 9 for "S9", 3 for "S3" and so on. </td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8fcb868518a98795360f726cb29f9ae0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">StSRecordFile::~StSRecordFile </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>
<p>Frees any data allocated as part of an S-record. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="afca35d431dd292a7a076dc61812132d7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_st_s_record_file.html#a4b439a23c78eaa62e57b8df3b610fedf">const_iterator</a> StSRecordFile::getBegin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>iterator for </dd></dl>

</div>
</div>
<a class="anchor" id="afca35d431dd292a7a076dc61812132d7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_st_s_record_file.html#a4b439a23c78eaa62e57b8df3b610fedf">const_iterator</a> StSRecordFile::getBegin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>iterator for </dd></dl>

</div>
</div>
<a class="anchor" id="a50093e3e673fb3fc3cef96b027e9da13"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned StSRecordFile::getRecordCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>the number of S-records that have been parsed from the input stream. </dd></dl>

</div>
</div>
<a class="anchor" id="a50093e3e673fb3fc3cef96b027e9da13"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned StSRecordFile::getRecordCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>the number of S-records that have been parsed from the input stream. </dd></dl>

</div>
</div>
<a class="anchor" id="ab3ed60149e0eeee552ba0a9ca9cbe3ce"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool StSRecordFile::isSRecordFile </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determine if the file is an S-record file. </p>
<p>Just looks for "S[0-9]" as the first two characters of the file. </p>

</div>
</div>
<a class="anchor" id="a5855dddf97a886d1ef8f272ad511c41c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void StSRecordFile::parse </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Parses the entire S-record input stream. </p>
<p>Extract records one line at a time and hand them to the <a class="el" href="class_st_s_record_file.html#a3d2ffc96958eaf4502dcbcf1e506309c" title="Parses individual S-records. ">parseLine()</a> method. Either CR, LF, or CRLF line endings are supported. The input stream is read until EOF. The <a class="el" href="class_st_s_record_file.html#a5855dddf97a886d1ef8f272ad511c41c" title="Parses the entire S-record input stream. ">parse()</a> method must be called after the object has been constructed before any of the records will become accessible. </p><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="class_st_s_record_parse_exception.html" title="Simple exception thrown to indicate an error in the input SRecord data format. ">StSRecordParseException</a></td><td>will be thrown if any error occurs while parsing the input. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3d2ffc96958eaf4502dcbcf1e506309c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void StSRecordFile::parseLine </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>inLine</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Parses individual S-records. </p>
<p>Takes a single S-record line as input and appends a new <a class="el" href="class_st_s_record_file.html#struct_st_s_record_file_1_1_s_record">SRecord</a> struct to the m_records vector. </p><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="class_st_s_record_parse_exception.html" title="Simple exception thrown to indicate an error in the input SRecord data format. ">StSRecordParseException</a></td><td>will be thrown if any error occurs while parsing <em>inLine</em>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1fbaf270f2939dc1d1f16b7fe1d4d5b8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int StSRecordFile::readHexByte </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>inString</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>inIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="class_st_s_record_parse_exception.html" title="Simple exception thrown to indicate an error in the input SRecord data format. ">StSRecordParseException</a></td><td>is thrown if either of the nibble characters is not a valid hex digit. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="apps_2elftosb_2common_2_st_s_record_file_8h_source.html">apps/elftosb/common/StSRecordFile.h</a></li>
<li>apps/elftosb/common/StSRecordFile.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_st_s_record_file.html">StSRecordFile</a></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:51 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
